let sp = new Swiper('.swiper-container', {
    direction: 'horizontal',
    autoplay: {
        delay: 3000,
        stopOnLastSlide: false,
        disableOnInteraction: false,
    },
    loop: true,
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
})
// 鼠标的悬停切换
for (i = 0; i < sp.pagination.bullets.length; i++) {
    sp.pagination.bullets[i].onmouseover = function () {
        this.click()
    }
}

// 导航吸顶操作
$(window).scroll(function() {
				
    if($(window).scrollTop() > 50) {
        $('.nav').addClass("sticky");
    } else {
        $('.nav').removeClass("sticky");
    }

    if($(window).scrollTop() > 200) {
        $('.nav').addClass("offset");
    } else {
        $('.nav').removeClass("offset");
    }

    if($(window).scrollTop() > 300) {
        $('.nav').addClass("scrolling");
    } else {
        $('.nav').removeClass("scrolling");
    }

});